package com.shlh.saas.service.impl;

import com.shlh.saas.mapper.AnnouncementMapper;
import com.shlh.saas.service.AnnouncementService;
import com.shlh.saas.service.AuthService;
import jakarta.annotation.Resource;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

@Service
public class AnnouncementServiceImpl implements AnnouncementService {

    @Resource
    private AnnouncementMapper announcementMapper;

    @Override
    public List<String> getAnnouncements(Long status, String lang) {
        if (Objects.equals(lang, "zh")){
            return announcementMapper.selectAnnouncementsList(status);
        } else {
            return announcementMapper.selectAnnouncementsEnList(status);
        }
    }
}
